<?php
namespace addon\cms\validate;
use app\common\validate\ValidateBase;
class Spage extends ValidateBase
{
    // 验证规则
    protected $rule = [
        'title'                 => 'require',
        'keywords'               => 'require',
        'description'                => 'require',
    ];

    // 验证提示
    protected $message = [
        'title.require'         => '标题不能为空',
        'keywords'              => '关键词必须',
        'description'           => '描述必须',
    ];

    // 应用场景
    protected $scene = [
        'add'  =>  ['title','keywords','description'],
    ];
}